define("p/head/index", ["base", "io", "node", "util"], function (e, n, t) {
    var a = e("base"), r = e("io"), o = e("node"), s = e("util");
    return function (e) {
        function n(i) {
            if (t[i]) return t[i].exports;
            var a = t[i] = {exports: {}, id: i, loaded: !1};
            return e[i].call(a.exports, a, a.exports, n), a.loaded = !0, a.exports
        }

        var t = {};
        return n.m = e, n.c = t, n.p = "/build/", n(0)
    }([function (e, n, t) {
        function i() {
            new a
        }

        t(26);
        var a = t(12);
        new i, e.exports = i
    }, , , function (e, n) {
        var t = location.href.indexOf("test") != -1 || "127.0.0.1" == location.hostname ? "test" : "cn",
            i = {env: t, host: "//api-gw.damai." + t + "/"};
        e.exports = i
    }, function (e, n) {
        e.exports = a
    }, function (e, n) {
        e.exports = r
    }, , , function (e, n) {
        e.exports = o
    }, , function (e, n) {
        e.exports = s
    }, function (e, n, t) {
        function a() {
            var e = this;
            e.loginkey = "", e.getPointOptions = function (e) {
                var n = {};
                if (!e.getAttribute("data-spm")) return n;
                var t = window.g_SPM && window.g_SPM.getParam(e) || {}, i = e.getAttribute("data-alg") || "",
                    a = e.getAttribute("data-href") || "";
                if (t && t.d) {
                    var r = "", o = t.d.replace(/^i/, ""),
                        s = encodeURIComponent(t.a + "." + t.b + "." + t.c + "." + o);
                    n = {params: {spm: s}, buryPoint: {pageUrl: a, "spm-url": s, alg: i, source: ""}}
                }
                return n
            }, e.getUA = function () {
                var e = {}, n = navigator.userAgent.toLowerCase(), t;
                return (t = n.match(/edge\/([\d.]+)/)) ? e.edge = t[1] : (t = n.match(/rv:([\d.]+)\) like gecko/)) ? e.ie = t[1] : (t = n.match(/msie ([\d.]+)/)) ? e.ie = t[1] : (t = n.match(/firefox\/([\d.]+)/)) ? e.firefox = t[1] : (t = n.match(/chrome\/([\d.]+)/)) ? e.chrome = t[1] : (t = n.match(/opera.([\d.]+)/)) ? e.opera = t[1] : (t = n.match(/version\/([\d.]+).*safari/)) && (e.safari = t[1]), e
            }, e.getSpmStr = function (n) {
                var t = e.getPointOptions(n);
                return t && t.params && t.params.spm ? "&spm=" + t.params.spm : ""
            }, e.sendPoints = function (n, t) {
                var i = "&spm=" + e.getSpmStr(t);
                window.goldlog && window.goldlog.record("/damai_pc.default.click", "CLK", "locaid=" + n + i, "POST")
            }, e.sendGoldLog = function (n) {
                var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
                    i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "/damai_pc.default.click",
                    a = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "CLK",
                    r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : "GET";
                if (!window.goldlog) return !1;
                var o = e.getPointOptions(n);
                if (!o.params) return console.log("\u7f3a\u5c11D\u70b9\u53c2\u6570"), !1;
                var s = "";
                for (var c in t) s += s ? "&" + c + "=" + t[c] : c + "=" + t[c];
                var l = "spm=" + o.params.spm + ";" + s;
                window.goldlog.record(i, a, l, r)
            }, e.changeURLPar = function (e, n, t) {
                var a = "";
                if (e = e || location.href, e.indexOf("?") == -1) return e + "?" + n + "=" + t;
                a = e.substr(e.indexOf("?") + 1);
                var r = "", o = "", s, c = "0";
                if (a.indexOf("&") != -1) {
                    s = a.split("&");
                    for (i in s) s[i].split("=")[0] == n ? (o = t, c = "1") : o = s[i].split("=")[1], r = r + s[i].split("=")[0] + "=" + o + "&";
                    r = r.substr(0, r.length - 1), "0" == c && r == a && (r = r + "&" + n + "=" + t)
                } else a.indexOf("=") != -1 ? (s = a.split("="), s[0] == n ? (o = t, c = "1") : o = s[1], r = s[0] + "=" + o, "0" == c && r == a && (r = r + "&" + n + "=" + t)) : r = n + "=" + t;
                return e.substr(0, e.indexOf("?")) + "?" + r
            }, e.addParam = function (e, n, t, i) {
                var a = e.split("#"), o = r(a, 2), s = o[0], c = o[1], l = s;
                return l += l.indexOf("?") > 0 ? "&" + n + "=" + (i ? encodeURIComponent(t) : t) : "?" + n + "=" + (i ? encodeURIComponent(t) : t), c && (l += "#" + c), l
            }, e.getCookie = function (e) {
                var n = void 0, t = new RegExp("(^| )" + e + "=([^;]*)(;|$)");
                return (n = document.cookie.match(t)) ? n[2] : null
            }, e.delCookie = function (e) {
                var n = new Date;
                n.setTime(n.getTime() - 864e5);
                var t = "/", i = "damai." + s;
                document.cookie = e + "=;domain=" + i + ";path=/;expires=" + n.toGMTString(), document.cookie = e + "=;path=/;expires=" + n.toGMTString()
            }, e.setCookie = function (n, t, i) {
                e.delCookie(n), i = i || 2592e6;
                var a = new Date;
                a.setTime(a.getTime() + i), document.cookie = n + "=" + escape(t) + ";domain=damai." + s + ";expires=" + a.toGMTString() + ";path=/"
            }, e.getUrlParam = function (e, n) {
                n = n || location.search;
                var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)"), i = n.substr(1).match(t);
                return null != i ? i[2] : ""
            }, e.delUrlParam = function (e, n) {
                var t = "";
                if (n) {
                    var i = n.split("?");
                    t = i[0], n = i[1] ? "?" + i[1] : ""
                } else n = window.location.search;
                return e.split(",").forEach(function (e) {
                    if (!e) return !1;
                    var t = new RegExp("([^?])" + e + "=([^&]*)|" + e + "=[^&]*(&)?", "g");
                    n = n.replace(t, ""), n = "?" === n ? "" : n
                }), t ? t + n : window.location.protocol + "//" + window.location.host + window.location.pathname + n
            }, e.checkLogin = function () {
                var n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href,
                    t = e.getCookie("damai.cn_user_new");
                return e.loginkey = e.getCookie("loginkey"), !t || !e.loginkey
            }, e.login = function () {
                var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.location.href;
                return window.location.href = "//passport.damai." + s + "/login?ru=" + encodeURIComponent(e), !1
            }, e.getItemLink = function (e) {
                var n = e.toString() || 0, t = n.length;
                return t <= 8 ? "//piao.damai." + s + "/" + e + ".html?" : t >= 9 && t <= 11 || 1e11 === e ? "//item.damai." + s + "/item/project.htm?id=" + e : "//detail.damai." + s + "/item.htm?id=" + e
            }, e.storage = {
                set: function n(e, t) {
                    localStorage.setItem(e, t)
                }, get: function t(e) {
                    return localStorage.getItem(e)
                }, remove: function a(e) {
                    localStorage.removeItem(e)
                }
            }, e.isLogin = function () {
                return !(!this.getCookie("loginkey") && !this.getCookie("damai.cn_nickName"))
            }
        }

        var r = function () {
            function e(e, n) {
                var t = [], i = !0, a = !1, r = undefined;
                try {
                    for (var o = e[Symbol.iterator](), s; !(i = (s = o.next()).done) && (t.push(s.value), !n || t.length !== n); i = !0) ;
                } catch (c) {
                    a = !0, r = c
                } finally {
                    try {
                        !i && o["return"] && o["return"]()
                    } finally {
                        if (a) throw r
                    }
                }
                return t
            }

            return function (n, t) {
                if (Array.isArray(n)) return n;
                if (Symbol.iterator in Object(n)) return e(n, t);
                throw new TypeError("Invalid attempt to destructure non-iterable instance")
            }
        }(), o = t(3), s = o.env, c = new a;
        e.exports = c
    }, function (e, n, t) {
        function i() {
            var e = [];
            x.jsonp(f + "navigation.html", {}, function (n) {
                n && n.data && n.data.length && (n.data.forEach(function (n, t) {
                    e.push('<a href="' + n.schema + '" class="type-recommend" data-spm="dother' + t + '">' + n.title + "</a>")
                }), w(".recommend-header").append(e.join("")))
            })
        }

        function a(e) {
            location.hostname === "www.damai." + m && (e.find(".location-header").show(), x.jsonp(f + "cityList.html", {}, function (n) {
                if (!n || !n.hotCities || !n.allCities) return void console.log("\u83b7\u53d6\u57ce\u5e02\u5217\u8868\u5f02\u5e38");
                r(e, n.hotCities, ".hot-city .list-other"), r(e, n.allCities, ".other-city .list-other")
            }), e.find(".city-location").html(k), e.find(".now-city .name-city").html(k), e.delegate("click", ".name-city", function (e) {
                var n = w(e.target).html();
                n && (h("destCity", n), u.sendPoints("dselectcity&clicktitle=" + n, e.target), location.reload())
            }))
        }

        function r(e, n, t) {
            for (var i = "", a = 0, r = n.length; a < r; a++) {
                var o = n[a];
                i += "<span  class='name-city' data-spm='dselectcity&clicktitle=" + o + "'>" + o + "</span>"
            }
            e.find(t).html(i)
        }

        function o(e) {
            if (y && b) {
                var n = e.find(".user-header");
                e.find(".out-login").addClass("show"), e.find(".out-login").on("click", function () {
                    for (var e = 0; e < v.length; e++) u.delCookie(v[e]);
                    location.href = "//ipassport.damai." + m + "/logout.htm?site=18&toURL=" + encodeURIComponent(location.href) + u.getSpmStr(this)
                }), x.jsonp(f + "user.html", {}, function (n) {
                    if (n && n.userNick) {
                        var t = n;
                        t.userImg = t.userImg || "https://img.alicdn.com/tfs/TB1SF.EBTtYBeNjy1XdXXXXyVXa-150-150.png", t.userImg = t.userImg.replace(/(http:|https:)/, ""), e.find(".i-user").attr("src", t.userImg + "?r=" + Math.random()), e.find(".J_userinfo_img").attr("href", e.find(".J_userinfo_name").attr("href")), e.find(".login-user").removeClass("show");
                        var i = e.find(".name-user").html(t.userNick).addClass("show")
                    }
                })
            }
        }

        function s(e) {
            var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 300, t = null;
            return function () {
                var i = this, a = arguments;
                clearTimeout(t), t = setTimeout(function () {
                    e.apply(i, a)
                }, n)
            }
        }

        function c(e) {
            var n = e.find(".input-search"), t = e.find(".list-search"), i = e.find(".btn-search"), a = null, r = 1,
                o = e.find(".search-header"), c = u.getUrlParam("keyword");
            c && n.val(decodeURIComponent(c)), i.on("click", function () {
                var e = u.getSpmStr(this);
                window.location.href = "//search.damai.cn/search.html?keyword=" + encodeURIComponent(n.val()) + e
            }), n.on("keyup", function (e) {
                var n = this, t = n.value;
                if (13 === e.keyCode) {
                    var i = u.getSpmStr(n);
                    return void (window.location.href = "//search.damai.cn/search.html?keyword=" + encodeURIComponent(t) + i)
                }
            }), n.on("keyup", s(function (e) {
                var n = this, i = n.value;
                if (!i) return t.html(""), void t.removeClass("search-border");
                o.addClass("on"), x.jsonp(f + "suggest.html", {keyword: i, destCity: k}, function (e) {
                    var n = e, i = "";
                    if (n && n.length) {
                        for (var a = 0, r = n.length; a < r; a++) {
                            var o = n[a];
                            i += '<a href="' + u.getItemLink(o.id) + '" class="li-search" data-spm="ditem_' + a + '" target="_blank">\n\t\t\t\t\t\t\t<span class="title-search">' + o.name + '</span>\n\t\t\t\t\t\t\t<span class="city-search">' + o.cityName + "</span>\n\t\t\t\t\t\t</a>"
                        }
                        t.html(i), t.addClass("search-border")
                    }
                })
            }, 500))
        }

        function l(e) {
            e.on("mouseover", function () {
                e.addClass("on")
            }), e.on("mouseout", function () {
                e.removeClass("on")
            })
        }

        var d = t(3), u = t(11), f = d.host, m = d.env, p = u.getCookie, h = u.setCookie,
            v = "damai.cn_user,damai.cn_user_new,h5token,loginkey,user_id,damai_cn_user,damai.cn_email,damai.cn_nickName,x_hm_tuid,_tb_token_".split(","),
            g = t(4), w = t(8), x = t(5), k = u.getCookie("destCity");
        k = k ? unescape(k) : "\u5168\u56fd";
        var y = p("loginkey"), b = p("damai.cn_nickName");
        b = b ? unescape(b) : "";
        var T = t(13), C = g.extend({
            initializer: function L() {
                var e = new T, n = w(".dm-header-wrap");
                a(n), o(n), c(n), i(n), l(n.find(".download-header")), l(n.find(".location-header")), w("body").on("click", function () {
                    n.find(".search-header").removeClass("on")
                }), l(n.find(".user-header")), n.find(".span-user").on("click", function () {
                    var e = this;
                    location.href = "//passport.damai." + m + "/login?ru=" + encodeURIComponent(location.href)
                });
                for (var t = w(".type-recommend"), r = 0, s = t.length; r < s; r++) {
                    var d = w(t[r]);
                    d.attr("href").indexOf(location.host) >= 0 ? d.addClass("select") : d.removeClass("select")
                }
            }
        }, {ATTRS: {}});
        e.exports = C
    }, function (e, n, t) {
        function i(e) {
            return e && e.__esModule ? e : {"default": e}
        }

        var a = t(14), r = i(a), o = t(3), s = t(11), c = o.env, l = "has_click_redpack";
        t(15);
        var d = t(8), u = t(10), f = t(16), m = t(22), p = t(5), h = t(4), v = document.location.host,
            g = /127\.0\.0\.1/.test(v), w = /www\.damai\.cn|test/.test(v), x = /detail\.damai\.cn|test/.test(v),
            k = h.extend({
                initializer: function y() {
                    var e = this;
                    if (e.initScroll(), e.bindEvent(), e.getToken(), g || w || x) {
                        var n = e.isHot();
                        console.log("\u662f\u5426\u662f\u5927\u62a2\u9879\u76ee: ", n, " \u662f\u5426\u5df2\u7ecf\u767b\u5f55: ", s.isLogin()), n || s.isLogin() || e.getPromotion(), !n && s.isLogin() && ("login" === s.getUrlParam("from") && /passport\.damai/.test(document.referrer) && (e.fromLogin = !0, e.delLogin()), setTimeout(function () {
                            e.showRedPop()
                        }, 2e3))
                    }
                }, delLogin: function b() {
                    var e = s.delUrlParam("from");
                    history.replaceState(null, null, e)
                }, initScroll: function T() {
                    var e = this, n = d(f());
                    e.side = n, d("body").append(n)
                }, goTopAmi: function C() {
                    var e = this;
                    cancelAnimationFrame(e.timer), e.timer = requestAnimationFrame(function n() {
                        var t = document.body.scrollTop || document.documentElement.scrollTop;
                        t > 0 ? (document.body.scrollTop = document.documentElement.scrollTop = t - 150, e.timer = requestAnimationFrame(n)) : cancelAnimationFrame(e.timer)
                    })
                }, bindEvent: function L() {
                    var e = this;
                    d("body").delegate("click", ".alime", function (n) {
                        n.preventDefault(), e.showAlime()
                    }, this), d("body").delegate("click", ".redpack", function (e) {
                        e.preventDefault(), s.sendGoldLog(e.currentTarget, {item_id: "drawuserzone"});
                        var n = s.addParam(document.location.href, "from", "login");
                        s.login(n)
                    }, this), d("body").delegate("click", ".close", function (n) {
                        n.preventDefault(), e.red && e.red.remove()
                    }, this), d("body").delegate("click", ".yellow-btn", function (n) {
                        n.preventDefault(), s.sendGoldLog(n.currentTarget, {item_id: "dusepacket"}), e.red && e.red.remove(), location.href = d(n.currentTarget).attr("href")
                    }, this), d(".J_GoTop").on("click", function () {
                        e.goTopAmi()
                    })
                }, getToken: function _(e) {
                    var n = this, t = "//online.damai.cn/alime/getDialogToken?from=damai_pc&jsonCallback=jsonCallback";
                    window.jsonCallback = function (e) {
                        e && e.token && (n.token = e.token)
                    }, new p({
                        type: "get",
                        url: "//online.damai.cn/alime/getDialogToken?from=damai_pc&jsonCallback=jsonCallback",
                        jsonpCallback: "jsonCallback",
                        dataType: "jsonp"
                    })
                }, showAlime: function E() {
                    var e = this;
                    window.open("https://ai.alimebot.taobao.com/intl/index.htm?from=EtbcRzNj3U&_user_access_token=" + e.token)
                }, openDialog: function A() {
                    var e = this;
                    e.alicareDialog ? e.alicareDialog.ui.emit("openDialog") : e.initAlime(function () {
                        e.alicareDialog.ui.emit("openDialog")
                    })
                }, initAlime: function S(e) {
                    var n = this;
                    window.alicareDialogAsyncInit = function (t) {
                        n.alicareDialog = new t({
                            from: "iAr6RZDmcb",
                            accessToken: n.token
                        }), n.alicareDialog.onRendered(function (n) {
                            e && e()
                        })
                    };
                    var t = document.createElement("script");
                    t.src = "//g.alicdn.com/alime/dialog/alicare-dialog.js", document.getElementsByTagName("body")[0].appendChild(t)
                }, isHot: function U() {
                    var e = document.getElementById("staticDataDefault");
                    if (e) {
                        return JSON.parse("" + e.innerHTML).itemBase.isHotProject || !1
                    }
                    return !1
                }, getPromotion: function I() {
                    var e = this;
                    p.jsonp("https://api-gw.damai." + c + "/registerpromotion", {}, function (n) {
                        n.model && e.side.prepend('<div class="item redpack" data-spm="drawuserzone"><div class="redpack-icon"></div><p>\u65b0\u4eba\u793c\u5305</p><p class="price">\uffe5' + n.model.amount + "</p></div>")
                    })
                }, showRedPop: function j(e) {
                    var n = this;
                    p.jsonp("https://api-gw.damai." + c + "/popupmessage?types=1", {}, function (e) {
                        if (console.log(e), e.success) if (e.model && e.model.length) {
                            var t = e.model[0].contentList[0], i = d(m(t));
                            n.red = i, d("body").append(i), s.sendGoldLog(i.find(".redpack-pop")[0], {item_id: "dshow"}, "/damai_pc.default.click", "EXP"), p.jsonp("https://api-gw.damai." + c + "/clearmessage?type=1&messageId=" + encodeURIComponent(t.id), {}, function (e) {
                            })
                        } else n.fromLogin && n.showToast("\u4ec5\u9650\u65b0\u7528\u6237\u9886\u53d6"); else n.fromLogin && n.showToast("\u8bf7\u5728\u201c\u6211\u7684\u4f18\u60e0\u5238\u201d\u67e5\u770b\u9886\u53d6\u7ed3\u679c")
                    })
                }, showToast: function P(e) {
                    var n = this;
                    n.toast || (n.toast = d('<div class="redpack-toast"><span class="icon"></span>' + e + "</div>"), d("body").append(n.toast)), clearTimeout(n.timer), n.timer = setTimeout(function () {
                        n.toast.fadeOut(1, function () {
                            n.toast.remove(), n.toast = null
                        })
                    }, 3e3)
                }
            }, {ATTRS: {}});
        e.exports = k
    }, function (e, n) {
        var t = {
            success: !0,
            model: [{
                contentList: [{
                    title: "23131",
                    header: "321321",
                    itemList: [{
                        amount: 220,
                        condition: "\u6ee100.00\u5143\u53ef\u7528",
                        name: "\u4e2d\u534e\u4eba\u6c11\u5171\u548c\u56fd\u662f\u9b42\u7275\u68a6\u8426\u5f71\u54cd\u529b",
                        startTime: "2019-08-12",
                        endTime: "2019-08-12"
                    }, {
                        amount: 10,
                        condition: "12212",
                        name: "\u9b42\u7275\u68a6\u8426---dddf",
                        startTime: "2019-08-12",
                        endTime: "2019-08-12"
                    }, {
                        amount: 10,
                        condition: "12212",
                        name: "\u65b0\u4eba\u4f18\u60e0\u5238100\u5143\u4ee3\u91d1\u5238",
                        startTime: "2019-08-12",
                        endTime: "2019-08-12"
                    }, {
                        amount: 10,
                        condition: "12212",
                        name: "\u9b42\u7275\u68a6\u8426f",
                        startTime: "2019-08-12",
                        endTime: "2019-08-12"
                    }, {
                        amount: 10,
                        condition: "12212",
                        name: "\u9b42\u7275\u68a6\u8426f",
                        startTime: "2019-08-12",
                        endTime: "2019-08-12"
                    }],
                    buttonName: "Use",
                    pcButtonAction: "afda",
                    footer: "fffff"
                }]
            }]
        };
        e.exports = t
    }, function (e, n) {
    }, function (e, n, t) {
        var i = t(17);
        e.exports = function () {
            var e = function t(e) {
                var n, t, i, a, r, o, s, c, l, d, u, f = this, m = f.root, p = f.buffer, h = f.scope, v = f.runtime,
                    g = f.name, w = f.pos, x = h.data, k = h.affix, y = m.nativeCommands, b = m.utils, T = b.callFn,
                    C = b.callDataFn, L = b.callCommand, _ = y.range, E = y["void"], A = y.foreach, S = y.forin,
                    U = y.each, I = y["with"], j = y["if"], P = y.set, D = y.include, O = y.parse, R = y.extend,
                    N = y.block, B = y.macro, F = y["debugger"];
                return p.data += '<div class="sidebar" data-spm="slidelayer">\n    <div class="item">\n        <a href="javascript:void(0)" target="_blank">\n            <div class="icon damai"></div>\n            <p>APP\u4e0b\u8f7d</p>\n            <div class="qrcode"></div>\n        </a>\n    </div>\n    <div class="item J_GoTop" >\n        <div class="icon gotop"></div>\n        <p>\u56de\u5230\u9876\u90e8</p>\n    </div>\n</div>', p
            };
            if (this.root instanceof i) return e.apply(this, arguments);
            var n = new i(e);
            return n.render.apply(n, arguments)
        }
    }, function (e, n, t) {
        function i(e, n, t, i, a, r, o, s) {
            this.name = e, this.originalName = r || e, this.runtime = n, this.root = t, this.pos = {line: 1}, this.scope = i, this.buffer = a, this.fn = o, this.parent = s
        }

        function a(e, n, t) {
            var i = t[0], a = e && e[i] || n && n[i] || v[i];
            if (1 === t.length) return a;
            if (a) for (var r = t.length, o = 1; o < r; o++) if (!(a = a[t[o]])) return !1;
            return a
        }

        function r(e, n) {
            var t = e.split("/"), i = n.split("/");
            t.pop();
            for (var a = 0, r = i.length; a < r; a++) {
                var o = i[a];
                "." === o || (".." === o ? t.pop() : t.push(o))
            }
            return t.join("/")
        }

        function o(e, n, t, i, r, o) {
            var s, c, l;
            if (o || (l = a(e.runtime.commands, e.root.config.commands, r)), l) return l.call(e, n, t, i);
            if (l !== !1) {
                var d = r.slice(0, -1);
                if (null == (s = n.resolve(d, o))) return i.error("Execute function `" + r.join(".") + "` Error: " + d.join(".") + " is undefined or null"), i;
                if (c = s[r[r.length - 1]]) try {
                    return c.apply(s, t.params || [])
                } catch (u) {
                    return i.error("Execute function `" + r.join(".") + "` Error: " + u.message), i
                }
            }
            return i.error("Command Not Found: " + r.join(".")), i
        }

        function s(e, n) {
            var t = this;
            t.fn = e, t.config = p.merge(s.globalConfig, n), this.subNameResolveCache = {}
        }

        function c(e, n, t) {
            if ("." !== n.charAt(0)) return n;
            var i = t + "_ks_" + n, a = e.subNameResolveCache, o = a[i];
            return o ? o : n = a[i] = r(t, n)
        }

        function l(e, n, t, i, a, r) {
            var o = c(e, r, a.name), s = i.insert(), l = s.next;
            return u(e, o, a.runtime, n, s, r, t, i.tpl), l
        }

        function d(e, n, t, a, r) {
            var o = t.insert(), s = o.next, c = new i(r.TPL_NAME, a.runtime, e, n, o, undefined, r, t.tpl);
            return o.tpl = c, f(c), s
        }

        function u(e, n, t, a, r, o, s, c) {
            var l = new i(n, t, e, a, r, o, undefined, c);
            r.tpl = l, e.config.loader.load(l, function (e, n) {
                "function" == typeof n ? (l.fn = n, f(l)) : e ? r.error(e) : (n = n || "", s ? r.writeEscaped(n) : r.data += n, r.end())
            })
        }

        function f(e) {
            var n = e.fn();
            if (n) {
                var t = e.runtime, i = t.extendTpl, a;
                if (i && !(a = i.params[0])) return n.error("extend command required a non-empty parameter");
                var r = t.extendTplFn, o = t.extendTplBuffer;
                return r ? (t.extendTpl = null, t.extendTplBuffer = null, t.extendTplFn = null, d(e.root, e.scope, o, e, r).end()) : a && (t.extendTpl = null, t.extendTplBuffer = null, l(e.root, e.scope, 0, o, e, a).end()), n.end()
            }
        }

        function m(e, n, t) {
            var i = n.params;
            if (!i[0]) return t.error("include command required a non-empty parameter");
            var a = e, r = i[1], o = n.hash;
            return o && (r = r ? p.mix({}, r) : {}, p.mix(r, o)), r && (a = new g(r, undefined, e)), a
        }

        var p = t(18), h = t(19), v = {}, g = t(20), w = t(21), x = {
            callFn: o, callDataFn: function k(e, n) {
                for (var t = n[0], i = t, a = 1; a < n.length; a++) {
                    var r = n[a];
                    if (!i || null == i[r]) return "";
                    t = i, i = i[r]
                }
                return i.apply(t, e || [])
            }, callCommand: function y(e, n, t, i, a) {
                return o(e, n, t, i, a)
            }
        };
        p.mix(s, {
            config: function b(e, n) {
                var t = this.globalConfig = this.globalConfig || {};
                if (!arguments.length) return t;
                n !== undefined ? t[e] = n : p.mix(t, e)
            }, nativeCommands: h, utils: x, util: p, addCommand: function T(e, n) {
                v[e] = n
            }, removeCommand: function C(e) {
                delete v[e]
            }
        }), s.prototype = {
            constructor: s, Scope: g, nativeCommands: h, utils: x, removeCommand: function L(e) {
                var n = this.config;
                n.commands && delete n.commands[e]
            }, addCommand: function _(e, n) {
                var t = this.config;
                t.commands = t.commands || {}, t.commands[e] = n
            }, include: function E(e, n, t, i) {
                return l(this, m(e, n, t), n.escape, t, i, n.params[0])
            }, includeModule: function A(e, n, t, i) {
                return d(this, m(e, n, t), t, i, n.params[0])
            }, render: function S(e, n, t) {
                var a = "", r = this, o = r.fn, c = r.config;
                "function" == typeof n && (t = n, n = null), n = n || {}, t = t || function (e, n) {
                    if (e) throw e instanceof Error || (e = new Error(e)), e;
                    a = n
                };
                var l = r.config.name;
                !l && o && o.TPL_NAME && (l = o.TPL_NAME);
                var d;
                d = e instanceof g ? e : new g(e);
                var u = new s.LinkedBuffer(t, c).head, m = new i(l, {commands: n.commands}, r, d, u, l, o);
                return u.tpl = m, o ? (f(m), a) : (c.loader.load(m, function (e, n) {
                    n ? (m.fn = r.fn = n, f(m)) : e && u.error(e)
                }), a)
            }
        }, s.Scope = g, s.LinkedBuffer = w, e.exports = s
    }, function (e, n) {
        (function (n) {
            function t() {
                var e = "";
                for (var n in i) e += n + "|";
                return e = e.slice(0, -1), r = new RegExp(e, "g")
            }

            var i = {
                    "&": "&amp;",
                    ">": "&gt;",
                    "<": "&lt;",
                    "`": "&#x60;",
                    "/": "&#x2F;",
                    '"': "&quot;",
                    "'": "&#x27;"
                }, a = /[&<>"'`]/, r = t(), o = /\\?\{([^{}]+)\}/g, s = void 0 !== n ? n : window, c,
                l = Object.prototype.toString;
            e.exports = c = {
                isArray: Array.isArray || function (e) {
                    return "[object Array]" === l.call(e)
                }, keys: Object.keys || function (e) {
                    var n = [], t;
                    for (t in e) e.hasOwnProperty(t) && n.push(t);
                    return n
                }, each: function d(e, n, t) {
                    if (e) {
                        var i, a, r, o = 0, s = e && e.length,
                            l = s === undefined || "[object Function]" === Object.prototype.toString.call(e);
                        if (t = t || null, l) for (r = c.keys(e); o < r.length && (i = r[o], n.call(t, e[i], i, e) !== !1); o++) ; else for (a = e[0]; o < s && n.call(t, a, o, e) !== !1; a = e[++o]) ;
                    }
                    return e
                }, mix: function u(e, n) {
                    if (n) for (var t in n) e[t] = n[t];
                    return e
                }, globalEval: function f(e) {
                    s.execScript ? s.execScript(e) : function (e) {
                        s.eval.call(s, e)
                    }(e)
                }, substitute: function m(e, n, t) {
                    return "string" == typeof e && n ? e.replace(t || /\\?\{([^{}]+)\}/g, function (e, t) {
                        return "\\" === e.charAt(0) ? e.slice(1) : n[t] === undefined ? "" : n[t]
                    }) : e
                }, escapeHtml: function p(e) {
                    return e = "" + e, a.test(e) ? (e + "").replace(r, function (e) {
                        return i[e]
                    }) : e
                }, merge: function h() {
                    for (var e = 0, n = arguments.length, t = {}; e < n; e++) {
                        var i = arguments[e];
                        i && c.mix(t, i)
                    }
                    return t
                }
            }
        }).call(n, function () {
            return this
        }())
    }, function (e, n, t) {
        var i = t(20), a = t(18), r = {
            range: function o(e, n) {
                var t = n.params, i = t[0], a = t[1], r = t[2];
                r ? (i > a && r > 0 || i < a && r < 0) && (r = -r) : r = i > a ? -1 : 1;
                for (var o = [], s = i; i < a ? s < a : s > a; s += r) o.push(s);
                return o
            }, "void": function s() {
                return undefined
            }, foreach: function c(e, n, t) {
                var a = n.params, r = a[0], o = a[2] || "xindex", s = a[1], c, l, d, u;
                if (r) for (c = r.length, u = 0; u < c; u++) l = new i(r[u], {
                    xcount: c,
                    xindex: u
                }, e), d = l.affix, "xindex" !== o && (d[o] = u, d.xindex = undefined), s && (d[s] = r[u]), t = n.fn(l, t);
                return t
            }, forin: function l(e, n, t) {
                var a = n.params, r = a[0], o = a[2] || "xindex", s = a[1], c, l, d;
                if (r) for (d in r) c = new i(r[d], {xindex: d}, e), l = c.affix, "xindex" !== o && (l[o] = d, l.xindex = undefined), s && (l[s] = r[d]), t = n.fn(c, t);
                return t
            }, each: function d(e, n, t) {
                var i = n.params, o = i[0];
                return o ? a.isArray(o) ? r.foreach(e, n, t) : r.forin(e, n, t) : t
            }, "with": function u(e, n, t) {
                var a = n.params, r = a[0];
                if (r) {
                    var o = new i(r, undefined, e);
                    t = n.fn(o, t)
                }
                return t
            }, "if": function f(e, n, t) {
                if (n.params[0]) {
                    var i = n.fn;
                    i && (t = i(e, t))
                } else {
                    var a = !1, r = n.elseIfs, o = n.inverse;
                    if (r) for (var s = 0, c = r.length; s < c; s++) {
                        var l = r[s];
                        if (a = l.test(e)) {
                            t = l.fn(e, t);
                            break
                        }
                    }
                    !a && o && (t = o(e, t))
                }
                return t
            }, set: function m(e, n, t) {
                for (var i = n.hash, a = i.length, r = 0; r < a; r++) {
                    var o = i[r], s = o.key, c = o.depth, l = o.value;
                    if (1 === s.length) {
                        for (var d = e.root; c && d !== e;) e = e.parent, --c;
                        e.set(s[0], l)
                    } else {
                        var u = e.resolve(s.slice(0, -1), c);
                        u && (u[s[s.length - 1]] = l)
                    }
                }
                return t
            }, include: 1, parse: 1, extend: 1, block: function p(e, n, t) {
                var i = this, a = i.runtime, r = n.params, o = r[0], s;
                2 === r.length && (s = r[0], o = r[1]);
                var c = a.blocks = a.blocks || {}, l = c[o], d, u = {fn: n.fn, type: s};
                if (l) {
                    if (l.type) if ("append" === l.type) u.next = l, c[o] = u; else if ("prepend" === l.type) {
                        var f;
                        for (d = l; d && "prepend" === d.type;) f = d, d = d.next;
                        u.next = d, f.next = u
                    }
                } else c[o] = u;
                if (!a.extendTpl) for (d = c[o]; d;) d.fn && (t = d.fn.call(i, e, t)), d = d.next;
                return t
            }, macro: function h(e, n, t) {
                var a = n.hash, r = n.params, o = r[0], s = r.slice(1), c = this, l = c.runtime,
                    d = l.macros = l.macros || {}, h = d[o];
                if (n.fn) d[o] = {paramNames: s, hash: a, fn: n.fn}; else if (h) {
                    var u = h.hash || {}, f;
                    if (f = h.paramNames) for (var m = 0, p = f.length; m < p; m++) {
                        var v = f[m];
                        u[v] = s[m]
                    }
                    if (a) for (var g in a) u[g] = a[g];
                    var w = new i(u);
                    w.root = e.root, t = h.fn.call(c, w, t)
                } else {
                    var x = "can not find macro: " + o;
                    t.error(x)
                }
                return t
            }
        };
        r["debugger"] = function () {
            a.globalEval("debugger")
        }, e.exports = r
    }, function (e, n) {
        function t(e, n, t) {
            e !== undefined ? this.data = e : this.data = {}, t ? (this.parent = t, this.root = t.root) : (this.parent = undefined, this.root = this), this.affix = n || {}, this.ready = !1
        }

        t.prototype = {
            isScope: 1, constructor: t, setParent: function i(e) {
                this.parent = e, this.root = e.root
            }, set: function a(e, n) {
                this.affix[e] = n
            }, setData: function r(e) {
                this.data = e
            }, getData: function o() {
                return this.data
            }, mix: function s(e) {
                var n = this.affix;
                for (var t in e) n[t] = e[t]
            }, get: function c(e) {
                var n = this.data, t, i = this.affix;
                return null != n && (t = n[e]), t !== undefined ? t : i[e]
            }, resolveInternalOuter: function l(e) {
                var n = e[0], t, i = this, a = i;
                if ("this" === n) t = i.data; else if ("root" === n) a = a.root, t = a.data; else {
                    if (!n) return [a.data];
                    do {
                        t = a.get(n)
                    } while (t === undefined && (a = a.parent))
                }
                return [undefined, t]
            }, resolveInternal: function d(e) {
                var n = this.resolveInternalOuter(e);
                if (1 === n.length) return n[0];
                var t, i = e.length, a = n[1];
                if (a === undefined) return undefined;
                for (t = 1; t < i; t++) {
                    if (null == a) return a;
                    a = a[e[t]]
                }
                return a
            }, resolveLooseInternal: function u(e) {
                var n = this.resolveInternalOuter(e);
                if (1 === n.length) return n[0];
                var t, i = e.length, a = n[1];
                for (t = 1; null != a && t < i; t++) a = a[e[t]];
                return a
            }, resolveUp: function f(e) {
                return this.parent && this.parent.resolveInternal(e)
            }, resolveLooseUp: function m(e) {
                return this.parent && this.parent.resolveLooseInternal(e)
            }, resolveOuter: function p(e, n) {
                var t = this, i = t, a;
                if (!n && 1 === e.length) {
                    if ((a = t.get(e[0])) !== undefined) return [a];
                    n = 1
                }
                if (n) for (; i && n--;) i = i.parent;
                return i ? [undefined, i] : [undefined]
            }, resolveLoose: function h(e, n) {
                var t = this.resolveOuter(e, n);
                return 1 === t.length ? t[0] : t[1].resolveLooseInternal(e)
            }, resolve: function v(e, n) {
                var t = this.resolveOuter(e, n);
                return 1 === t.length ? t[0] : t[1].resolveInternal(e)
            }
        }, e.exports = t
    }, function (e, n, t) {
        function i(e, n, t) {
            this.list = e, this.init(), this.next = n, this.ready = !1, this.tpl = t
        }

        function a(e, n) {
            var t = this;
            t.config = n, t.head = new i(t, undefined), t.callback = e, this.init()
        }

        var r = t(18);
        i.prototype = {
            constructor: i, isBuffer: 1, init: function o() {
                this.data = ""
            }, append: function s(e) {
                return this.data += e, this
            }, write: function c(e) {
                if (null != e) {
                    if (e.isBuffer) return e;
                    this.data += e
                }
                return this
            }, writeEscaped: function l(e) {
                if (null != e) {
                    if (e.isBuffer) return e;
                    this.data += r.escapeHtml(e)
                }
                return this
            }, insert: function d() {
                var e = this, n = e.list, t = e.tpl, a = new i(n, e.next, t), r = new i(n, a, t);
                return e.next = r, e.ready = !0, r
            }, async: function u(e) {
                var n = this.insert(), t = n.next;
                return e(n), t
            }, error: function f(e) {
                var n = this.list.callback;
                if (n) {
                    var t = this.tpl;
                    if (t) {
                        e instanceof Error || (e = new Error(e));
                        var i = t.name, a = t.pos.line, r = "XTemplate error in file: " + i + " at line " + a + ": ";
                        e.stack = r + e.stack, e.message = r + e.message, e.xtpl = {pos: {line: a}, name: i}
                    }
                    this.list.callback = null, n(e, undefined)
                }
            }, end: function m() {
                var e = this;
                return e.list.callback && (e.ready = !0, e.list.flush()), e
            }
        }, a.prototype = {
            constructor: a, init: function p() {
                this.data = ""
            }, append: function h(e) {
                this.data += e
            }, end: function v() {
                this.callback(null, this.data), this.callback = null
            }, flush: function g() {
                for (var e = this, n = e.head; n;) {
                    if (!n.ready) return void (e.head = n);
                    this.data += n.data, n = n.next
                }
                e.end()
            }
        }, a.Buffer = i, e.exports = a
    }, function (e, n, t) {
        var i = t(17);
        e.exports = function () {
            var e = function t(e) {
                function n(e, n, t) {
                    var i = e.data, a = e.affix;
                    return n.data += "single", n
                }

                function t(e, n, t) {
                    var i = e.data, r = e.affix;
                    n.data += '\n                <div class="item">\n                    <div class="item-left">\n                        <div class="price"><em>\uffe5</em>', y.line = 15;
                    var o = (a = r.amount) !== t ? a : (a = i.amount) !== t ? a : e.resolveLooseUp(["amount"]);
                    n = n.writeEscaped(o), n.data += '</div>\n                        <div class="text">', y.line = 16;
                    var s = (a = r.condition) !== t ? a : (a = i.condition) !== t ? a : e.resolveLooseUp(["condition"]);
                    n = n.writeEscaped(s), n.data += '</div>\n                    </div>\n                    <div class="item-right">\n                        <div class="main-title">', y.line = 19;
                    var c = (a = r.name) !== t ? a : (a = i.name) !== t ? a : e.resolveLooseUp(["name"]);
                    n = n.writeEscaped(c), n.data += '</div>\n                        <div class="date">', y.line = 20;
                    var l = (a = r.startTime) !== t ? a : (a = i.startTime) !== t ? a : e.resolveLooseUp(["startTime"]);
                    n = n.writeEscaped(l), n.data += " - ";
                    var d = (a = r.endTime) !== t ? a : (a = i.endTime) !== t ? a : e.resolveLooseUp(["endTime"]);
                    return n = n.writeEscaped(d), n.data += "</div>\n                    </div>\n                </div>\n                ", n
                }

                function i(e, n, t) {
                    var i = e.data, r = e.affix;
                    n.data += '<a class="yellow-btn" href="';
                    var o = (a = r.pcButtonAction) !== t ? a : (a = i.pcButtonAction) !== t ? a : e.resolveLooseUp(["pcButtonAction"]);
                    n = n.writeEscaped(o), n.data += '" data-spm="dusepacket">';
                    var s = (a = r.buttonName) !== t ? a : (a = i.buttonName) !== t ? a : e.resolveLooseUp(["buttonName"]);
                    return n = n.writeEscaped(s), n.data += "</a>", n
                }

                var a, r, o, s, c, l, d, u, f, m, p, h = this, v = h.root, g = h.buffer, w = h.scope, x = h.runtime,
                    k = h.name, y = h.pos, b = w.data, T = w.affix, C = v.nativeCommands, L = v.utils, _ = L.callFn,
                    E = L.callDataFn, A = L.callCommand, S = C.range, U = C["void"], I = C.foreach, j = C.forin,
                    P = C.each, D = C["with"], O = C["if"], R = C.set, N = C.include, B = C.parse, F = C.extend,
                    M = C.block, G = C.macro, X = C["debugger"];
                g.data += '<div class="redpack-mask" data-spm="layer_red_packet">\n    <div class="redpack-pop ', y.line = 2;
                var q = (a = T.itemList) !== e ? null != a ? r = a.length : a : (a = b.itemList) !== e ? null != a ? r = a.length : a : w.resolveLooseUp(["itemList", "length"]),
                    H = q;
                H = 1 === q, g = O.call(h, w, {
                    params: [H],
                    fn: n
                }, g), g.data += '" data-spm="dshow">\n        <div class="bg bg1"></div>\n        <div class="bg bg2"></div>\n        <div class="bg bg3"></div>\n\n        <div class="close">\xd7</div>\n        <div class="title">', y.line = 8;
                var z = (a = T.title) !== e ? a : (a = b.title) !== e ? a : w.resolveLooseUp(["title"]);
                g = g.writeEscaped(z), g.data += '</div>\n        <div class="desc">', y.line = 9;
                var J = (a = T.header) !== e ? a : (a = b.header) !== e ? a : w.resolveLooseUp(["header"]);
                g = g.writeEscaped(J), g.data += '</div>\n        <div class="outer">\n            <div class="list">\n                ', y.line = 12, y.line = 12;
                var K = (a = T.itemList) !== e ? a : (a = b.itemList) !== e ? a : w.resolveLooseUp(["itemList"]);
                g = P.call(h, w, {
                    params: [K],
                    fn: t
                }, g), g.data += "\n            </div>\n        </div>\n        ", y.line = 26;
                var Y = (a = T.pcButtonAction) !== e ? a : (a = b.pcButtonAction) !== e ? a : w.resolveLooseUp(["pcButtonAction"]);
                g = O.call(h, w, {params: [Y], fn: i}, g), g.data += '\n        <div class="status">', y.line = 27;
                var $ = (a = T.footer) !== e ? a : (a = b.footer) !== e ? a : w.resolveLooseUp(["footer"]);
                return g = g.writeEscaped($), g.data += "</div>\n    </div>\n</div>", g
            };
            if (this.root instanceof i) return e.apply(this, arguments);
            var n = new i(e);
            return n.render.apply(n, arguments)
        }
    }, , , , function (e, n) {
    }])
}), KISSY.use("p/head/index");